list1 = [27,15,14,3,6,8]
n = 0
print(list1)
print()
while n < len(list1):
    i = 0
    while i < len(list1)-(n+1):
        if list1[i] > list1[i+1]:
            list1[i],list1[i+1] = list1[i+1],list1[i]
        i += 1
    print(list1)
    n += 1
